package com.ruoyi.vehicleDispatch.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.vehicleDispatch.mapper.ElectronicFenceMapper;
import com.ruoyi.vehicleDispatch.domain.ElectronicFence;
import com.ruoyi.vehicleDispatch.service.IElectronicFenceService;

/**
 * 电子围栏数据Service业务层处理
 * 
 * @author niuyi
 * @date 2025-08-19
 */
@Service
public class ElectronicFenceServiceImpl implements IElectronicFenceService 
{
    @Autowired
    private ElectronicFenceMapper electronicFenceMapper;

    /**
     * 查询电子围栏数据
     * 
     * @param fenceId 电子围栏数据主键
     * @return 电子围栏数据
     */
    @Override
    public ElectronicFence selectElectronicFenceByFenceId(Integer fenceId)
    {
        return electronicFenceMapper.selectElectronicFenceByFenceId(fenceId);
    }

    /**
     * 查询电子围栏数据列表
     * 
     * @param electronicFence 电子围栏数据
     * @return 电子围栏数据
     */
    @Override
    public List<ElectronicFence> selectElectronicFenceList(ElectronicFence electronicFence)
    {
        return electronicFenceMapper.selectElectronicFenceList(electronicFence);
    }

    /**
     * 新增电子围栏数据
     * 
     * @param electronicFence 电子围栏数据
     * @return 结果
     */
    @Override
    public int insertElectronicFence(ElectronicFence electronicFence)
    {
        return electronicFenceMapper.insertElectronicFence(electronicFence);
    }

    /**
     * 修改电子围栏数据
     * 
     * @param electronicFence 电子围栏数据
     * @return 结果
     */
    @Override
    public int updateElectronicFence(ElectronicFence electronicFence)
    {
        return electronicFenceMapper.updateElectronicFence(electronicFence);
    }

    /**
     * 批量删除电子围栏数据
     * 
     * @param fenceIds 需要删除的电子围栏数据主键
     * @return 结果
     */
    @Override
    public int deleteElectronicFenceByFenceIds(Integer[] fenceIds)
    {
        return electronicFenceMapper.deleteElectronicFenceByFenceIds(fenceIds);
    }

    /**
     * 删除电子围栏数据信息
     * 
     * @param fenceId 电子围栏数据主键
     * @return 结果
     */
    @Override
    public int deleteElectronicFenceByFenceId(Integer fenceId)
    {
        return electronicFenceMapper.deleteElectronicFenceByFenceId(fenceId);
    }
}
